// 销售员模型
const {Schema,model} =require('mongoose');

const salesmansSchema = new Schema({
    username:String,
    password:{
        type:String,
        default:'123456'
    },
    customerId:[{
        type:Schema.Types.ObjectId,
        ref:'customersModel'
    }],
    name:String,
    age:String,
    sex:String,
    images:{
        type:String,
        default:'default.jpg'
    },
    isAdmins:{
        type:Boolean,
        default:false
    },
    isDel:{
        type:Boolean,
        default:false,
    },
    tel:String,
},{versionKey:false})

module.exports.salesmansModel = model('salesmansModel',salesmansSchema,'salesmans')